import request from '@/utils/request.js'

/**
 *获取评论
 * @param {*} params
 * @returns promise
 */
export const getUserChannles = params => {
  return request({
    method: 'GET',
    url: '/v1_0/comments',
    params
  })
}

/**
 *取消评论点赞
 * @param {*} id
 * @returns promise
 */
export const deleteCommentLiking = id => {
  return request({
    method: 'DELETE',
    url: '/v1_0/comment/likings/' + id
  })
}

/**
 *增加评论点赞
 * @param {*} id
 * @returns promise
 */
export const AddCommentLiking = id => {
  return request({
    method: 'POST',
    url: '/v1_0/comment/likings',
    data: {
      target: id
    }
  })
}
